<?php

$user = $_POST['user'];
$type = $_POST['type'];
$status = $_POST['status'];
date_default_timezone_set('Asia/Calcutta');
$time = time();

if(fwrite(fopen('../../../chat/'.$type.'_'.$user.'.xml', 'w'), $status))
{
//echo "written";
}
else
echo "not written";
 
?>